package com.common.http.basecore.parse;

import android.net.Uri;

import com.alibaba.fastjson.JSON;
import com.common.http.basecore.callback.IGenericsSerializator;
import com.common.http.basecore.utils.LogInfo;

/**
 * Created by haitian on 2016/8/10.
 */
public class JsonGenericsSerializator implements IGenericsSerializator {
    @Override
    public <T> T transform(String response, Class<T> classOfT) {
        LogInfo.log("response","response = " + response);
        return  JSON.parseObject(Uri.decode(response), classOfT);
    }
}
